var assert = require('assert');
var should = require('should');
var util = require('util');
var _ = require('lodash');
var smithyModel = require('../../app/models/smithyModel');
var config = require('../config');

suite('测试smithyModel', function () {
    var smithy_model;
    setup(function (done) {
        smithyModel.getByRoleId(config.role_id, function (err, model) {
            assert.equal(err == null, true);
            smithy_model = model;
            smithy_model.toJSON();
            done();
        });
    });

    suite('getWorkerOpen', function () {
        test('获取工匠列表', function (done) {
            // smithy_model.openSmithy(2);
            // smithy_model.openWorker(1);
            // smithy_model.openWorker(2);
            // smithy_model.addWorkerSchedule(1, 1800);
            smithy_model.addEnergy(20);
            smithy_model.save(done);
        });
    });
});
